package com.pb.wkflow.api.mapper;

import com.pb.wkflow.api.entity.WfSysProcInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author 苗益辉
 * @date 2022/9/28 9:15
 */
@Mapper
@Repository
public interface WfSysProcInfoMapper {

    /**
     * 新增数据
     * @param wfSysProcInfoEntity 流程信息表
     */
    void insert(WfSysProcInfoEntity wfSysProcInfoEntity);

    /**
     * 更新流程
     * @param wfSysProcInfoEntity 流程信息表
     */
    void update(WfSysProcInfoEntity wfSysProcInfoEntity);

    /**
     * 根据流程实例id删除
     * @param procInstId 流程实例id
     */
    void deleteByProcessInstId(@Param("procInstId") String procInstId);

    /**
     * 根据流程定义id删除
     * @param procDefineId procDefineId
     */
    void deleteByProcessDefineId(@Param("procDefineId") String procDefineId);

    /**
     * 根据流程实例id查询
     * @param procInstId 流程实例id
     * @return WfSysProcInfoEntity
     */
    WfSysProcInfoEntity selectOne(@Param("procInstId") String procInstId);
}
